找传奇、传世资源到传世资源站!

C# 远程监控 完整项目源码下载(含监控端和受控端)

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

/************************************************************///【项目】:远程监控/************************************************************/using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace SmartKernel.Net{ public partial class MonitorClient : Form { #region 字段 private bool Initialized = false; private bool InProgress = false; private System.Threading.Thread MonitorThread = null; #endregion #region 构造函数 public MonitorClient() { InitializeComponent(); Application.Idle = new EventHandler(Application_Idle); } #endregion #region 应用程序空闲状态的处理过程 void Application_Idle(object sender, EventArgs e) { this.checkBox1.Enabled = this.textBox1.Text.Trim().Length > 0; } #endregion #region 监控开始 private void Monitor() { while (true) { this.monitorUserControl1.UpdateDisplay(); System.Threading.Thread.Sleep(200); //延迟? } } #endregion #region 监视 private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (((CheckBox)sender).Checked) { if (!Initialized) { Cursor = Cursors.WaitCursor; this.monitorUserControl1.Initialize(this.textBox1.Text.Trim()); Initialized = true; Cursor = Cursors.Arrow; } InProgress = true; MonitorThread = new System.Threading.Thread(new System.Threading.ThreadStart(Monitor)); MonitorThread.Start(); } else { InProgress = false; MonitorThread.Abort(); } } #endregion }}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复